package jmine.tec.database.query.domain;

import jmine.tec.test.Builder;

/**
 * Construtor para a entidade NodeEntity.
 * 
 * @author lundberg
 */
public class NodeEntityBuilder implements Builder<NodeEntity> {

    private NodeEntity entity = new NodeEntity();

    public static NodeEntityBuilder aNode() {
        return new NodeEntityBuilder();
    }

    /**
     * {@inheritDoc}
     */
    public NodeEntity build() {
        return this.entity;
    }

    public NodeEntityBuilder withParent(NodeEntity parent) {
        this.entity.setParent(parent);
        return this;
    }

    public NodeEntityBuilder withLeaf(LeafEntity leaf) {
        this.entity.addLeaf(leaf);
        return this;
    }

}
